package com.hyfrogx.modules.information.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hyfrogx.common.utils.QueryExt;
import com.hyfrogx.modules.information.entity.InfoClassify;
import com.hyfrogx.modules.information.entity.HyInformationEntity;
import com.hyfrogx.modules.information.entity.InfoCommentEntity;

import java.util.List;

/**
 * @author liubin
 * @date 2019/10/29 13:27
 */
public interface InformationService extends IService<HyInformationEntity> {

  /**根据分类获取分类下所有内容和下拉随机获取数据
   * @param queryExt
   * @return
   */
  Page RandomGetInformationByContentType(QueryExt queryExt);


  /**
   * 评论资讯
   * @return boolean
   */
  //boolean commectInformation(InfoCommentEntity infoComment,Integer userId);


  HyInformationEntity getInformationById(Integer id,Integer userId);


  /**
   * 客戶端获取所有推荐资讯
   * @param query
   * @return
   */
  Page getallRecommendInformation(QueryExt query);

  Integer put(HyInformationEntity information);

  Integer publishInformation(Integer id);

  Integer downInformation(HyInformationEntity channel);

  /**
   * 资讯客户端提交审核
   * @param information
   * @return
   */
  Integer editInformation(HyInformationEntity information);

  /**
   * 获取所有资讯
   * @param queryExt
   * @return
   */
  Page getallInformation(QueryExt queryExt);

  /**
   * 判断当前分类下是否有资源
   * @param id
   * @return
   */
  List<HyInformationEntity> judgeInfoById(Integer id);
}
